# $Id: PKGBUILD 81016 2012-12-10 10:17:00Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Giovanni Scafora <linuxmania@gmail.com>

pkgname=driconf
pkgver=0.9.1
pkgrel=7
pkgdesc="A graphical configuration tool for the Direct Rendering Infrastructure"
arch=('any')
url="http://dri.freedesktop.org/wiki/DriConf"
license=('GPL')
depends=('pygtk' 'pyxml' 'expat' 'xorg-xdriinfo' 'mesa-demos')
source=(ftp://ftp.archlinux.org/other/community/driconf/driconf-$pkgver.tar.gz
	driconf.desktop
	drilogo.png)
md5sums=('76d610bcd56aa5e8a489debb5081178a'
         'd621b89ad6a623fa5828c05ab585dcb1'
         'b34317c8c3b70fa278c9992b8077092d')

build() {
  cd $srcdir/$pkgname-$pkgver
  sed -i -e "s:/usr/local/lib/driconf:$pkgdir/usr/lib/driconf:g" -e "s:/usr/local:$pkgdir/usr:g" setup.cfg
  sed -i -e "s:local/::" driconf
  sed -i -e "s:/usr/local:/usr:g" setup.py
  sed -i -e "s:/usr/local:/usr:g" driconf_commonui.py
}

package() {
  cd $srcdir/$pkgname-$pkgver
  python2 setup.py install
  install -Dm644 ../$pkgname.desktop $pkgdir/usr/share/applications/$pkgname.desktop
  install -Dm644 ../drilogo.png $pkgdir/usr/share/pixmaps/drilogo.png
}
